.check-box {
  position: relative;
  display: inline-block;
  height: 1rem;
  margin-right: 1.5rem;

  &::after {
    content: " ";

    position: absolute;
    top: 0;

    display: inline-block;

    box-sizing: border-box;
    width: 1rem;
    height: 1rem;
    padding-left: 0;
    border: 1px solid #aaa;
    border-radius: 2px;

    background: #ddd;

    text-align: center;

    visibility: visible;

    @media (prefers-color-scheme: dark) {
      border-color: #666;
      background: #222;
    }
  }

  &.checked {
    &::before {
      content: " ";

      position: absolute;
      top: 0.1rem;
      left: 0.35rem;
      z-index: 1;

      width: 0.2rem;
      height: 0.5rem;
      border-width: 0 0.15rem 0.15rem 0;
      border-style: solid;
      border-color: #fff;

      transform: rotate(45deg);

      @media (prefers-color-scheme: dark) {
        border-color: #000;
      }
    }

    &::after {
      border-color: var(--theme-color);
      background-color: var(--theme-color);
    }
  }
}
